/**
 * @description: 数据看板-常用功能
 */

const Router = require("koa-router");
const router = new Router();

// 区块数据（图标路径、名称、路由）
const blocks = [
  {
    name: "充电桩监控",
    path: "/chargingstation/monitor",
    icon: "/src/assets/repair.png",
  },
  {
    name: "充电桩管理",
    path: "/chargingstation/fault",
    icon: "/src/assets/progress.png",
  },
  {
    name: "电子地图",
    path: "/map",
    icon: "/src/assets/remain.png",
  },
  {
    name: "营收统计",
    path: "/chargingstation/revenue",
    icon: "/src/assets/total.png",
  },
  {
    name: "计费管理",
    path: "/operations/total",
    icon: "/src/assets/money.png",
  },
  {
    name: "招商管理",
    path: "/document",
    icon: "/src/assets/daily.png",
  },
];

// 接口：GET /blocks
router.get("/blocks", (ctx) => {
  ctx.body = {
    code: 200,
    data: blocks,
  };
});

module.exports = router;
